package com.hksj.common.core.enums;

public enum DeviceState {
    notActive("未激活"),
    offline("离线"),
    online("在线");

    private final String text;

    DeviceState(String text) {
        this.text = text;
    }

    public String getValue() {
        return name();
    }

    public String getText(String name){
        for (DeviceState deviceState : DeviceState.values()) {
            if (deviceState.name().equals(name)) {
                return deviceState.text;
            }
        }
        return null;
    }

}
